<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       
    </style>
</head>
<body>
    <div id="app">
        <h2 v-bind:class="[active,line]">{{message}}</h2>
        <h2 v-bind:class="getClass()">{{message}}</h2>

    </div>
    <script src="../js/vue.js">
    </script>
    <script>
        const app=new Vue({
            el:'#app',
            data:{
                message:'你好啊',
                imgUrl:'https://img.guguzhu.com/d/file/android/2021/06/11/yf24lgms0dg.png',
                active: 'aaa',
                line: 'bbb',
            },
            //方法
            methods:{
                btnClick:function(){
                    this.isLine=!this.isLine
                },
                getClass:function(){
                    return [this.active,this.line]
                }
            }
        })
    </script>
</body>
</html>